package com.fh.shop.api.common;

/**
 * 枚举类
 */
public enum ResponseEnum {

   PAY_ORDER_ID_IS_NULL(9000,"支付,订单id为空"),
   PAY_ORDER_ID_IS_ERROR(9001,"支付,订单id错误"),
   PAY_ORDER_IS_PAYED(9002,"支付,订单已支付"),

   IDEMPOTENCE_HEADER_IS_NULL(8000,"接口幂等性,头信息为空"),
   IDEMPOTENCE_IS_ERROR(8001,"接口幂等性,重复发送请求了"),

   ORDER_INFO_IS_NULL(7000,"提交订单,信息为空"),
   ORDER_CART_IS_ERROR(7001,"提交订单,购物车不存在"),
   ORDER_RECIPIENT_IS_ERROR(7002,"提交订单,收件人错误"),
   ORDER_STOCK_IS_ERROR(7003,"提交订单,库存不足:%s"),
   ORDER_STOCK_IS_ERROR_LOCK(7004,"提交订单,库存不足:%s"),

   MEMBER_ACTIVE_ID_IS_NULL(6000,"激活会员的id,错误"),
   MEMBER_ACTIVE_MAIL_NOT_EXIST(6001,"该邮箱不存在"),
   MEMBER_IS_ACTIVE(6003,"该会员,以激活"),

   CART_PRODUCT_IS_NULL(5000,"添加购物车中的商品不存在"),
   CART_PRODUCT_STATUS_IS_DOME(5001,"添加购物车中的商品已下架"),
   CART_PRODUCT_STOCK_IS_ERROR(5002,"添加购物车中的商品库存不足"),
   CART_PRODUCT_COUNT_IS_ERROR(5003,"商品数量含有非法字符"),
   CART_IS_NULL(5004,"购物车不存在"),
   CART_PRODUCT_ID_IS_ERROR(5005,"商品id不存在"),

   TOKEN_IS_NULL(4000,"token为空"),
   TOKEN_FORMAT_IS_ERROR(4001,"token格式错误"),
   TOKEN_VALIDATE_IS_ERROR(4002,"验签失败"),
   TOKEN_FORMAT_IS_NULL(4003,"token超时了"),
   TOKEN_DECODE_FAIL(4004,"解码失败"),
   TOKEN_IS_MISMATH(4005,"token不匹配"),

   MEMBER_LOGIN_IS_NULL(3000,"登录信息不能为空"),
   MEMBER_LOGIN_NAME_ERROR(3001,"登录时会员名错误"),
   MEMBER_LOGIN_PASSWORD_ERROR(3002,"登录时密码错误"),
   MEMBER_PWD_IS_NULL(3003,"修改密码，信息为空"),
   MEMBER_PWD_IS_MISMATCH(3004,"修改密码，密码不一致"),
   MEMBER_PWD_OLD_IS_MISMATCH(3005,"修改密码，旧密码错误"),
   MEMBER_LOGIN_STATUS_ERROR(3006,"当前未激活，不能登录"),

   MEMBER_REG_IS_NULL(2000,"注册不能为空"),
   MEMBER_REG_PASSWORD_MISMATCH(2001,"密码不一致"),
   MEMBER_REG_SMS_CODE_IS_ERROR(2002,"验证码错误"),
   MEMBER_REG_NAME_IS_EXIST(2003,"该会员已存在"),
   MEMBER_REG_PHONE_IS_EXIST(2004,"该手机号已存在"),
   MEMBER_REG_MAIL_IS_EXIST(2005,"该邮箱已存在"),
   MEMBER_REG_PHONE_IS_ERROR(2006,"该手机号格式错误"),
   MAIL_IS_ERROR(2007,"该邮箱格式错误"),
   SMS_PHONE_IS_NULL(1000,"手机号不能为空");


    private int code;
    private String msg;

    private ResponseEnum(int code,String msg){
        this.code=code;
        this.msg=msg;
    }



    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
